/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package DTO;

import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.Date;

/**
 *
 * @author Pham
 */
public class DTOInventory {
    int inventoryID;
    int inventoryQuatity;
    Date inventoryDate;
    DTOProduct dtoPro;
    
    //accesstor
    public int getInventoryID() {
        return inventoryID;
    }

    public void setInventoryID(int inventoryID) {
        this.inventoryID = inventoryID;
    }

    public int getInventoryQuatity() {
        return inventoryQuatity;
    }

    public void setInventoryQuatity(int inventoryQuatity) {
        this.inventoryQuatity = inventoryQuatity;
    }

    public Date getInventoryDate() {
        return inventoryDate;
    }

    public void setInventoryDate(Date inventoryDate) {
        this.inventoryDate = inventoryDate;
    }

    public DTOProduct getDtoPro() {
        return dtoPro;
    }

    public void setDtoPro(DTOProduct dtoPro) {
        this.dtoPro = dtoPro;
    }
    
    
    //contructor
    public DTOInventory()
    {
        
    }
    
    public DTOInventory(ResultSet rs) throws SQLException
    {
        this.inventoryID = rs.getInt("inventory_id");
        this.inventoryQuatity = rs.getInt("inventory_quantity");
        this.inventoryDate = rs.getDate("inventory_dateupdate");
        this.dtoPro = (new BLL.BLLProduct()).getProductbyID(rs.getInt("product_id"));
    }
}
